﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace CreateAndExport
{
    public partial class Form2 : Form
    {
        public Form2()
        {
            InitializeComponent();
        }

      
        private void Form2_Load(object sender, EventArgs e)
        {
            
        }

        public void LoadData(string comName, string departName)
        {
            var entities = new DbDataContext();
            dataGridView1.DataSource = entities.Employees.Where(e => e.Department1.Name.Equals(departName) && e.Department1.Company1.Name.Equals(comName));
        }

    }
}
